home *** CD-ROM | disk | FTP | other *** search
- <!--- This example calls the GetTickCount
- function to track execution time --->
- <html>
- <head>
- <title>GetTickCount function</title>
- </head>
-
- <BASEFONT FACE="Arial, Helvetica" SIZE=2>
- <BODY bgcolor="#FFFFD5">
- <h3>GetTickCount function</h3>
- <!--- Setup timing test --->
- <CFSET iterationCount = 1000>
-
- <!--- Time an empty loop with this many iterations --->
- <CFSET tickBegin = GetTickCount()>
- <CFLOOP Index=i From=1 To=#iterationCount#></CFLOOP>
- <CFSET tickEnd = GetTickCount()>
- <CFSET loopTime = tickEnd - tickBegin>
-
- <!--- Report --->
- <p>
- <CFOUTPUT>Loop time (#iterationCount# iterations) was: #loopTime# milliseconds</CFOUTPUT>
-
- </body>
- </html>
-